package com.dianjing.dianjing.dto.input;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;

/**
 * @author owf
 */
@Data
@ApiModel("注册入参")
public class UserInput {

    @NotBlank(message = "请输入用户名")
    @ApiModelProperty(value = "用户名",required = true)
    private String username;

    @NotBlank(message = "请输入密码")
    @ApiModelProperty(value = "密码",required=true)
    private String password;

    @NotBlank(message = "请再输入一遍密码")
    @ApiModelProperty(value = "请再输入一遍密码",required = true)
    private String passwordVerify;

    @ApiModelProperty("昵称")
    private String nickname;

    @Email(message = "邮箱格式不正确")
    @ApiModelProperty(value = "邮箱",required = true)
    private String email;

    @Max(2)
    @Min(0)
    @ApiModelProperty(value = "用户类型：1画师，2需求方",required = true)
    private Integer type;

}
